﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using VOL.Core.BaseProvider;
using VOL.Core.Utilities;
using VOL.Entity.AttributeManager;
using VOL.SmartMecial.IServices.NurseManage;


namespace VOL.WebApi.Controllers.SmartMecial
{
    /// <summary>
    /// 患者信息控制器
    /// 负责处理患者相关的API请求
    /// </summary>
    [Route("api/PatientController")]
    [PermissionTable(Name = "PatientController")]
    public class PatientController : ControllerBase
    {
        private readonly IPatientServices service;

        /// <summary>
        /// 构造函数，通过依赖注入获取患者服务实例
        /// </summary>
        /// <param name="service">患者服务</param>
        public PatientController(IPatientServices service)
        {
            this.service = service;
        }
        /// <summary>
        /// 查询患者信息(反填)
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>返回</returns>
        [HttpGet("GetByPatientId")]
        public async Task<WebResponseContent> GetByPatientId(string id)
        {
           return await service.GetByPatientId(id);
        }
    }
}
